#!/usr/bin/python
import struct
from ctypes import create_string_buffer

x = struct.pack("ii",1,2);
y = struct.pack("ii",3,4);
print repr(x)
print repr(y)
#===========================================
buf = create_string_buffer(12)
struct.pack_into("ii",buf,0,3,4)  #format, buf, offset, value
struct.pack_into("i",buf,8,55555)
#==========================================
a,b,c= struct.unpack_from("iii",buf)
print a
print b
print c

